import request from '@/utils/request'

export function tbDictDefinitionQuery(data) { //查询
    return request({
        method: 'get',
        url: '/tbSysDictDefinition/query',
        params: data,
    })
}

export function tbDictDefinitionAdd(data) { //新增
    return request({
        method: 'post',
        url: '/tbSysDictDefinition/add',
        data,
    })
}

export function tbDictDefinitionUpdate(data) { //修改
    return request({
        method: 'post',
        url: '/tbSysDictDefinition/update',
        data,
    })
}

export function tbDictDefinitionDelete(data) { //删除
    return request({
        method: 'get',
        url: '/tbSysDictDefinition/delete/'+data,
    })
}

export function tbDictDefinitionQueryEnumList(data) { //通过code查询枚举
    return request({
        method: 'get',
        url: '/tbSysDictDefinition/queryEnumList',
        params: data,
    })
}

export function tbDictTbSysDictDetail(data) { //查询枚举数据分页
    return request({
        method: 'get',
        url: '/tbSysDictDetail/query',
        params: data,
    })
}

export function addTbDictDefinitionEnumListClidren(data) { //添加数据字典枚举数据
    return request({
        method: 'post',
        url: '/tbSysDictDetail/add',
        data,
    })
}

export function deleteTbDictDefinitionEnumListClidren(id) { //删除数据字典枚举数据
    return request({
        method: 'get',
        url: '/tbSysDictDetail/delete/'+id,
    })
}

export function tbDictDefinitionQuerySxhhfsnEnumList(data) { //不登录查询枚举
    return request({
        method: 'get',
        url: '/tbSysDictDefinition/getSxhhfsrEnumList',
        params: data,
    })
}
export function tbSysDictDetailQueryByCode(data) { //查询枚举
    return request({
        method: 'get',
        url: '/tbSysDictDetail/queryByCode',
        params: data,
    })
}

export function tbDictDefinitionQueryConstantStrList(data) { //查询常量
    return request({
        method: 'get',
        url: '/tbSysDictDefinition/queryConstantStrList',
        params: data,
    })
}

export function openApiTbDictDefinitionQueryConstantStrList(data) { //查询常量(不登录)
    return request({
        method: 'get',
        url: '/openApi/tbSysDictDefinition/queryConstantStrList',
        params: data,
    })
}

export function tbDictDefinitionUpdateByConstantCode(data) { //通过code修改常量
    return request({
        method: 'post',
        url: '/tbSysDictDefinition/updateByConstantCode',
        data,
    })
}

export function sysJournalCollectAdd(data) { // 收藏下载数量
    //添加
    return request({
      method: 'post',
      url: '/sysJournalCollect/add',
      data,
    })
  }